Skip to content

Add e2e repro test and seqno log assertion for joining node with corrupted (truncated) ledger file#7666

Merged
achamayou merged 26 commits into
mainfrom
copilot/add-testcase-for-issue-6612
Jun 12, 2026
Merged

Add e2e repro test and seqno log assertion for joining node with corrupted (truncated) ledger file#7666
achamayou merged 26 commits into
mainfrom
copilot/add-testcase-for-issue-6612

Conversation

Copilot AI commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Reproduces issue #6612 when a node joins from a recent snapshot with an older corrupted or truncated uncommitted ledger file, and asserts that the malformed-ledger path is exercised.

The change adds test_add_node_with_corrupted_ledger to tests/reconfiguration.py, includes it in both the reconfiguration suite and the explicit run_all e2e flow, and makes the test fail if it cannot find a chunk or transaction to corrupt.

It also updates incomplete-ledger recovery logging in src/host/ledger.h so the malformed entry is reported at the corresponding seqno, and tightens the test to require that specific malformed-ledger log line for the targeted seqno.

The PR includes the related formatting follow-up and was validated with targeted checks plus code review and CodeQL.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add testcase for issue flagged in #6612 Add e2e test for joining node with corrupted (truncated) ledger file Feb 13, 2026
Copilot AI requested a review from achamayou February 13, 2026 09:31
Comment thread tests/reconfiguration.py Outdated
@eddyashton eddyashton marked this pull request as ready for review February 17, 2026 14:21
@eddyashton eddyashton requested a review from a team as a code owner February 17, 2026 14:21
Copilot AI review requested due to automatic review settings February 17, 2026 14:21
@eddyashton

Copy link
Copy Markdown
Member

Note that this is only a repro (not a fix) for #6612.

Comment thread tests/reconfiguration.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI changed the title Add e2e test for joining node with corrupted (truncated) ledger file Add e2e repro test and txid log assertion for joining node with corrupted (truncated) ledger file Jun 9, 2026
Copilot AI requested a review from achamayou June 9, 2026 10:49
@achamayou achamayou disabled auto-merge June 9, 2026 19:59
@achamayou

Copy link
Copy Markdown
Member

@copilot fix the code formatting

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix the code formatting

Addressed in 9e30ceb.

Comment thread src/host/ledger.h Outdated
Copilot AI changed the title Add e2e repro test and txid log assertion for joining node with corrupted (truncated) ledger file Add e2e repro test and seqno log assertion for joining node with corrupted (truncated) ledger file Jun 10, 2026
Copilot AI requested a review from achamayou June 10, 2026 12:16
@achamayou achamayou merged commit d18d692 into main Jun 12, 2026
19 checks passed
@achamayou achamayou deleted the copilot/add-testcase-for-issue-6612 branch June 12, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants